| Conditions | 2 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {renderToStaticMarkup} from "react-dom/server" |
||
| 6 | |||
| 7 | function expectToRender( |
||
| 8 | element: Parameters<typeof renderToStaticMarkup>[0], |
||
| 9 | expectation: string | string[] |
||
| 10 | ) { |
||
| 11 | return expect( |
||
| 12 | renderToStaticMarkup(element) |
||
| 13 | ).toBe( |
||
| 14 | !$isArray(expectation) |
||
| 15 | ? expectation |
||
| 16 | : expectation.join("") |
||
| 17 | ) |
||
| 19 |